package decorator;

import com.itheima.service.UserService;

/**
 * @program: Spring_day03_04_综合案例
 * @description:
 * @author: zhanghz001
 * @create: 2020-11-29 17:47
 **/
public class UserServiceImplDecorator2 implements UserService {
    //被包装对象加入其中
    private UserService userService;

    public UserServiceImplDecorator2(UserService userService) {
        this.userService = userService;
    }

    @Override
    public void save() {
        userService.save();
        System.out.println("save 装饰器模式下");
    }
}
